<?php
function lilina_userapi_check_feed($args)
{
    extract($args);
    if (empty($url) || !is_string($url)) {
        $msg = xarML('Invalid Parameter');
        xarErrorSet(XAR_SYSTEM_EXCEPTION, 'BAD_PARAM', new SystemException($msg));
        return;
    }
    if(!xarSecurityCheck('OverviewLilina')) return;
    $dbconn =& xarDBGetConn();
    $xartable =& xarDBGetTables();
    $table = $xartable['feeds'];
    $query = "SELECT xar_id,
                     xar_url
            FROM $table
            WHERE xar_url = ?";
    $bindvars = array($url);
    $result =& $dbconn->Execute($query,$bindvars);
    if (!$result) return;
    if($result->EOF){
        return false;
    } else {
        return true;
    }
}
?>